package com.dingding.common.core.base.dto;

import java.io.Serializable;
import java.util.List;

/**
 * 
 * @ClassName: ResponseEntity 
 * @Description: 客户端响应传输bean
 * @author CHEHAUNBO 
 * @date 2016年6月5日 下午9:46:21
 * 
 */
public class ResponseEntity<T> implements Serializable {

	private static final long serialVersionUID = 1L; 

	/**
	 * 响应码
	 */
	private int code = 200;

	/**
	 * 错误信息
	 */
	private String errorMessage;

	/**
	 * 提示信息
	 */
	private String promptMessage;

	/**
	 * 如果存在空字段，当前属性存储的就是空字段的名称
	 * 
	 * 说明：此字段从2.4.0 后过时
	 * 
	 */
	@Deprecated
	private String nullProperties;

	/**
	 * 空字段集合
	 */
	private List<String> nullPropList;

	/**
	 * 数据响应体
	 */
	private T responseBody;

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

	public String getPromptMessage() {
		return promptMessage;
	}

	public void setPromptMessage(String promptMessage) {
		this.promptMessage = promptMessage;
	}

	public T getResponseBody() {
		return responseBody;
	}

	public void setResponseBody(T responseBody) {
		this.responseBody = responseBody;
	}

	public String getNullProperties() {
		return nullProperties;
	}

	public void setNullProperties(String nullProperties) {
		this.nullProperties = nullProperties;
	}

	public List<String> getNullPropList() {
		return nullPropList;
	}

	public void setNullPropList(List<String> nullPropList) {
		this.nullPropList = nullPropList;
	}

	@Override
	public String toString() {
		return "ResponseEntity [code=" + code + ", errorMessage=" + errorMessage + ", promptMessage=" + promptMessage
				+ ", nullProperties=" + nullProperties + ", nullPropList=" + nullPropList + ", responseBody="
				+ responseBody + "]";
	}

}
